import { NgModule } from '@angular/core';
import { Routes, RouterModule, RouteReuseStrategy } from '@angular/router';
import { LoginComponent } from './pages/login/login.component';
import { HomeRoutingModule } from './pages/home/home-routing.module';
import { Pag404Component } from './pages/pag404/pag404.component';
import { SimpleReuseStrategy } from './pages/home/simpleReuseStrategy';

const routes: Routes = [
  { path: '', pathMatch: 'full', redirectTo: 'home' },
  // { path: 'home',loadChildren:()=>import('./pages/home/home.module').then(m=>m.HomeModule)},
  { path: 'login', component: LoginComponent },
  { path: '**', component: Pag404Component },
];

@NgModule({
  imports: [RouterModule.forRoot(routes, { relativeLinkResolution: 'legacy' }),],
  exports: [RouterModule],
})
export class AppRoutingModule { }
